-- GENERATED SPELL FOR [Vargul Runelord] --


function spell0_29891(pUnit, Event) --@Plague Shield,Self--
pUnit:FullCastSpellOnTarget(54512,pUnit)
pUnit:RegisterEvent('Sorts_29891', 607, 1)
end

function spell1_29891(pUnit, Event) --@Rune of Destruction,n/a--
pUnit:FullCastSpellOnTarget(56036,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29891', 5000, 1)
end

function Sorts_29891(pUnit, Event)
local choix_sorts_29891 = math.random(0, 1)
if choix_sorts_29891 == 0 then
pUnit:RegisterEvent('spell0_29891', 1, 1)
end
if choix_sorts_29891 == 1 then
pUnit:RegisterEvent('spell1_29891', 1, 1)
end
end

function mob29891_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29891', math.random(1500, 3000), 1)
end

function mob29891_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29891_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29891_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29891, 1, 'mob29891_Action')
RegisterUnitEvent(29891, 2, 'mob29891_Leave')
RegisterUnitEvent(29891, 3, 'mob29891_Kill')
RegisterUnitEvent(29891, 4, 'mob29891_Die')
